package com.design;

/**
 * 双重锁校验
 */
public class Singleton05 {
    private volatile Singleton05 singleton05;

    public Singleton05 getSingleton05(){
        if(singleton05 == null){
            synchronized (Singleton05.class){
                if(singleton05 == null){
                    singleton05 = new Singleton05();
                }
            }
        }
        return singleton05;
    }
    private Singleton05(){

    }
}
